home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
EDITORS
/
MEMACS
/
Cmd
/
Bufdel
< prev
next >
Wrap
Text File
|
1991-06-15
|
1KB
|
53 lines
; Apperently this lets you selectively delete buffers
; from inside the editor.
set %oldpflag $popflag
set $popflag FALSE
set %obuff $cbufname
set $discmd FALSE
list-buffers
select-buffer "[List]"
delete-mode view
end-of-file
set %lline $curline
beginning-of-file
3 next-line
!while &less $curline %lline
beginning-of-line
23 forward-character
insert-string "=>"
update-screen
print "Kill this buffer? (N/Y) "
set %resp &upper >key
2 delete-previous-character
!if &sequal "Y" %resp
set-mark
beginning-of-line
36 forward-character
backward-character
!while &equal $curchar 32
backward-character
!endwhile
forward-character
open-line
exchange-point-and-mark
set %bname #[List]
!if ¬ &sequal %bname %obuff
delete-buffer %bname
!endif
delete-previous-character
beginning-of-line
4 forward-character
!if ¬ &sequal %bname %obuff
overwrite-string "DELETED"
!else
overwrite-string "Buffer is being displayed."
!endif
!endif
next-line
!endwhile
set $discmd TRUE
delete-window
select-buffer %obuff
set $popflag %oldpflag